package cn.darkhorse.device.service;

import cn.darkhorse.device.pojo.MesMsgWarning;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 业务提醒 服务类
 * </p>
 *
 * @author yuan jun
 * @since 2023-02-03
 */
public interface MesMsgWarningService extends IService<MesMsgWarning> {

    /**
     * 列表
     *
     * @param deviceName
     * @param beginTime
     * @param endTime
     * @param userId
     * @param readFlag
     * @param msgType
     * @return
     */
    List<MesMsgWarning> listAll(String deviceName, String beginTime, String endTime, Long userId, Integer msgType, Integer readFlag);

    /**
     * 数量
     *
     * @param deviceName
     * @param beginTime
     * @param endTime
     * @param userId
     * @param readFlag
     * @param msgType
     * @return
     */
    Long count(String deviceName, String beginTime, String endTime, Long userId, Integer msgType, Integer readFlag);

    /**
     * 更新为已读
     * @param id
     * @return
     */
    boolean read(Long id);
}
